import { Meta } from '@storybook/blocks';
import YouTubeVideoPlayer from '@/components/YouTubeVideoPlayer';
import * as SliderStories from '../stories/Slider.stories';

<Meta of={SliderStories} />

# Slider

A Material Design slider.

<YouTubeVideoPlayer videoId="ufb4gIPDmEs" />

## Example

```dart liveslice=Slider
double _progress = 0;

@override
Widget build(BuildContext context) {
  return Slider(
    value: _progress,
    label: '$_progress',
    min: 0.0,
    max: 100.0,
    onChanged: (value){
      setState(() {
        _progress = value.roundToDouble();
      });
    },
  );
}
```

## Related Links

- https://api.flutter.dev/flutter/material/Slider-class.html
- https://youtu.be/ufb4gIPDmEs
